<html>
<head>
<title>Singapore Tourism</title>
<link href="shopping.css" rel="stylesheet" type="text/css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<!-- start header -->
<div id="header">
	<div id="logo">
		<h1><a href="#"><img src="images/lg.jpg"></a></h1>
    </div>
	<div id="menu">
		<ul>
			<li><a href="index.php">Home</a></li>
            <li><a href="hotel.php">Hotels</a></li>
			<li class="active"><a href="shopping.php">Shopping</a></li>
			<li><a href="dining.php">Restaurants</a></li>
			<li><a href="aboutus.php">About Us</a></li>
		
		</ul>
	</div>
</div>
<div id="page">
  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','920','height','200','title','flash','src','images/sds_2 (3)','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/sds' ); //end AC code
  </script>
  <noscript>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="920" height="200" title="flash">
    <param name="movie" value="images/sds.swf">
    <param name="quality" value="high">
    <embed src="images/sds_2 (3).swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="920" height="200"></embed>
  </object>
  </noscript>
  <?php
if(isset($_GET['centerId']) && isset($_GET['levelID'])) {
include ("include/config.php");
$sqlmall = "SELECT name FROM shoppingmall WHERE nameID='{$_GET['mallID']}'";
$resultmall = mysql_query("$sqlmall") or die("Invalid query: " . mysql_error());
$rowmall = mysql_fetch_array($resultmall);
print '<h2 align=\"center\"><font color=\"#33FF33\" >Welcome to '.$rowmall['name'].' :</font></h2>';

$sql = "SELECT levelName FROM level WHERE ShoppingMallnameID='{$_GET['mallID']}'";
$result = mysql_query("$sql") or die("Invalid query: " . mysql_error());
while ($row = mysql_fetch_array($result)){
print "<a href='level.php?mallID=".$_GET['mallID']."&levelID=".$row[0]."'><strong>".$row[0]."</strong></a> &nbsp; &nbsp; &nbsp;";
};
echo "<br />"; 
//print $row[0];

$level = $_GET['levelID'];
 ?>
<br />
<table border="0.5" width="75%" cellpadding="0" cellspacing="0" class="sortable" align="center">
<?php
$sql = "SELECT levelID FROM level WHERE levelName='$level' and ShoppingMallnameID='{$_GET['mallID']}'";
//echo $sql;
$result = mysql_query("$sql") or die("Invalid query: " . mysql_error());
$levelid = mysql_fetch_array($result);
$sql1 = "SELECT * FROM store WHERE levelid='$levelid[0]'";
//echo $sql1;
$result1 = mysql_query("$sql1");
//print "<table border=\"1\" cellpadding=\"0\">\n";
$i=0;

while($srow=mysql_fetch_assoc($result1)){
	if ($i%2==0)
		{ printf("<tr bgcolor=\"\">\n");
		}
		else
		{
		printf("<tr>\n");	}
		printf("<td rowspan=\"4\">");
		print '<img src="imageStore.php?image_id='.$srow['StoreID'].'"/>'."</br>";
		printf("</td>\n");
		printf("<td>");
		if ($i%2==0)
		{printf("<h3><font color=\"#999900\">");
		}
		else
		{
		printf("<h3><font color=\"#999900\">");
		}
		print $srow['StoreName'];
		printf("</font></h3>");
		printf("</td>");
		printf("</tr>");
		if ($i%2==0)
		{ printf("<tr bgcolor=\"\">\n");
		}
		else
		{
		printf("<tr>\n");	}
		
		printf("<td>");
		print $srow['StoreType'];
		printf("</a>");
		printf("</td>");
		printf("</tr>");
		
		if ($i%2==0)
		{ printf("<tr bgcolor=\"\">\n");
		}
		else
		{
		printf("<tr>\n");	}
		printf("<td>");
		print $srow['StoreAddr'];
		printf("</a>");
		printf("</td>");
		printf("</tr>");
		if ($i%2==0)
		{ printf("<tr bgcolor=\"\">\n");
		}
		else
		{
		printf("<tr>\n");	}
		printf("<td>");
		print $srow['StoreTel'];
		printf ("</td>");		
		printf("</tr>\n\n");
		printf("<tr height=\"10px\">");
		printf("</tr>\n\n");
		$i++;
}


mysql_close($link);
}else{
    echo 'Image ID is incorrect!';
}
?>
</table>
	<div id="sidebar">
	  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','920','height','159','title','adv','src','images/adv','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/adv' ); //end AC code
      </script>
	  <noscript>
	  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="920" height="159" title="adv">
        <param name="movie" value="images/adv.swf">
        <param name="quality" value="high">
        <embed src="images/adv.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="920" height="159"></embed>
      </object>
	  </noscript>
	  <div style="clear: both;">&nbsp;</div>
	</div>
  <!-- end sidebar -->
</div>
</div>

<!-- end page -->
<div id="footer">
	
</div>
</body>
</html>
 
